package edu.sctu.zcy.month201506.day20150607;

import java.util.Scanner;

/**
 * Created by user24 on 2015/6/7.
 */
public class RunMain {

    public static void main(String[] args) throws InterruptedException {

//        Scanner scanner = new Scanner(System.in);
//        String s1 = scanner.next();
////        String s2 = scanner.next();
//        if(s1.equals("开始计时")){
//
//            Thread thread = new Thread(new RunnableDemo(true));
//            thread.start();
//
//        }else {
//
//            Thread thread = new Thread(new RunnableDemo(false));
//            thread.start();
//            System.out.println("停止计时");
//        }


        ThreadDemo threadDemo = new ThreadDemo();
        Scanner scanner = new Scanner(System.in);
        boolean s1 = scanner.nextBoolean();

        if(s1 == true){

            threadDemo.c = true;

            threadDemo.start();

            Thread.sleep(10);
            threadDemo.c = false;

        }

    }
}
